/*************************************************************************
	> File Name: oj-390_cut_wood.cpp
	> Author: Wang Bo
	> Mail: 1276106221@qq.com
	> Created Time: 2020年11月01日 星期日 16时21分49秒
 ************************************************************************/

#include <iostream>
using namespace std;

int n, m, num[100005], lr;

int func(int len) {
    int sum = 0;
    for (int i = 0; i < n; ++i) {
        sum += num[i] / len;
    }
    return sum;
}

int main() {
    cin >> n >> m;
    for (int i = 0; i < n; ++i) {
        cin >> num[i];
        lr = max(lr, num[i]);
    }
    int l = 1, r = lr;
    while (l != r) {
        int mid = (l + r + 1) / 2;
        int sum = func(mid);
        if (sum >= m) {
            l = mid;
        }
        else {
            r = mid - 1;
        }
    }
    cout << r << endl;
    return 0;
}
